package com.subaiqiao.yunshiyuan.entrance.ysy.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author 曹朝禹
 * @since 2022-05-13
 */
@Getter
@Setter
@ApiModel(value = "Article对象", description = "")
public class ArticleVO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("消息编号")
    @TableId(value = "article_id", type = IdType.AUTO)
    private Integer articleId;

    @ApiModelProperty("消息标题")
    private String articleTitle;

    @ApiModelProperty("消息内容")
    private String articleContent;

    @ApiModelProperty("消息图片")
    private String articleCover;

    @ApiModelProperty("作者")
    private Integer articleAuthor;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("发布时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDatetime;

    @ApiModelProperty("文章类别")
    private Integer articleCategory;

    @ApiModelProperty("类别名称")
    private String sysCategoryName;

    @ApiModelProperty("文章简介")
    private String articleIntro;

    @ApiModelProperty("状态(0启用 1禁用)")
    @TableLogic
    private Integer status;

    @ApiModelProperty("浏览次数")
    private Integer articleCheckQuantity;

    @ApiModelProperty("关联产品")
    private String correlateProducts;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateDatetime;

    @JsonIgnore // 忽略掉这个字段，不进行展示
    @ApiModelProperty("乐观锁")
    @Version
    private Integer version;
}
